package com.eqdd.yiqidian.ui.mine.renwu;

import android.databinding.DataBindingUtil;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.PictureDrawable;
import android.text.Html;
import android.text.Spanned;
import android.view.View;
import android.widget.TextView;

import com.bumptech.glide.Glide;
import com.bumptech.glide.request.target.SimpleTarget;
import com.bumptech.glide.request.target.Target;
import com.bumptech.glide.request.transition.Transition;
import com.eqdd.yiqidian.R;
import com.eqdd.yiqidian.TextActivityCustom;
import com.eqdd.yiqidian.base.BaseActivity;
import com.eqdd.yiqidian.base.Config;
import com.eqdd.yiqidian.box.MyImageGetter;
import com.lzy.okgo.OkGo;
import com.lzy.okgo.model.HttpMethod;
import com.lzy.okgo.request.Request;
import com.lzy.okserver.OkDownload;

import java.io.File;
import java.net.URL;
import java.util.concurrent.ExecutionException;

import okhttp3.RequestBody;

public class TextActivity extends BaseActivity {
    private TextActivityCustom dataBinding;

    @Override
    public void initBinding() {
        dataBinding = DataBindingUtil.setContentView(this, R.layout.activity_text);
    }

    @Override
    public void initData() {
        String content = getIntent().getStringExtra(Config.CONTENT);
        String title = getIntent().getStringExtra(Config.TITLE);
        boolean ishtml = getIntent().getBooleanExtra(Config.IS_HTML, false);
        initTopTitleBar(View.VISIBLE, title);
        if (ishtml) {
            dataBinding.tvContent.setText(Html.fromHtml(content, new MyImageGetter(TextActivity.this, dataBinding.tvContent), null));
        } else {
            dataBinding.tvContent.setText(content);
        }
    }

    @Override
    public void setView() {

    }

    @Override
    public void onClick(View v) {
        super.onClick(v);
        switch (v.getId()) {

        }
    }
}
